
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>数据字典</title>
    <meta name="keywords" content="${setting.siteName}">
  	<meta name="description" content="${setting.siteName}">

  	<!-- BEGIN HEADER -->
		[#include "/admin/include/style.ftl"]
	<!-- END HEADER -->
	<style>
		.loippi-dic-tables{padding: 8px 0;display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
	</style>
</head>

<body class="gray-bg">
	<div class="row  border-bottom white-bg dashboard-header" style="padding: 10px;">
		<div class="col-sm-12">
			<div class="p-xs tooltip-demo">
				<div class="pull-left m-r-md">
					<i class="fa fa-leanpub text-navy mid-icon" style="color:#676a6c;"></i>
				</div>
				<h2>数据字典</h2>
							<a href="${base}/admin/common/dic.jhtml" id="full_screen" target="_blank" style="margin-right: 2px;" class="btn btn-white  pull-right" data-toggle="tooltip" data-placement="top" title="" data-original-title="全屏"><i class="fa fa-arrows-alt"></i> </a>
				<span>${setting.siteName}数据库结构设计
				</span>
			</div>
		</div>
	</div>
	<div class="wrapper wrapper-content">
		<div class="row">
			<div class="col-sm-2">
				<div class="ibox float-e-margins">
					<div class="ibox-content mailbox-content">
						<div class="file-manager">
							<ul class="folder-list m-b-md" style="padding: 0">
								[#list tables as table]
								<li class="x-category" title="${table.comment}">
									<a href="#table_${table.name?upper_case}" class="loippi-dic-tables" title="${table.comment}">${table_index+1}. ${table.name?upper_case}</a>
								</li>
								[/#list]
							</ul>
							<div class="clearfix"></div>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-10 animated fadeInRight">
				 [#list tables as table]
				<div class="mail-box-header" id="table_${table.name?upper_case}">
					<h2>
						${table.name?upper_case}[#if table.comment]<small style="margin-left: 10px; font-size: 5px;">${table.comment}</small>[/#if]
					</h2>
				</div>
				<div class="mail-box">
					<div class="ibox-content">
            			[#if table.columns?? && table.columns?size gt 0]
							<table class="table table-bordered">
	                            <thead>
	                                <tr>
	                                   <th style="width:30%">字段</th> 
	                                   <th style="width:20%">类型</th>
	                                   <th style="width:10%">主键</th> 
	                                   <th style="width:10%">可空</th>
	                                   <th style="width:30%">说明</th>
	                                </tr>
	                            </thead>
	                            <tbody>
	                            	[#list table.columns as c]
					                <tr> <td><code>${c.name}</code></td> <td>${c.sqlType}</td> <td>[#if c.pri ==  true]是[#else]-[/#if]</td><td>[#if c.null ==  true]是[#else]-[/#if]</td><td>${c.comment}</td> </tr>
					            	[/#list]
	                            </tbody>
	                        </table>
					 	[/#if]
					</div>
				</div>
				[/#list]
			</div>
			
		</div>
	</div>
	[#include "/admin/include/script.ftl"]
	<script>
		$(document).ready(function(){
			//判断在iframe时显示全屏按钮
			if(top.location==this.location){
			 	$("#full_screen").remove();
			 }
		});
	</script>
</body>
</html>
